#ifndef _cudafunc_h_
#define _cudafunc_h_
#include "toroidal.h"
#include <cusparse.h>

struct fvec;
struct fcylv;
struct fphsp;
struct fpfvecl;

void cudarandgen(float* da, int n, char type);
void cupush_rk2(world wld, float dt, int nt, float omega, int n);

struct fvec
{
    float x, y, z;
};

struct fcylv
{
    float r, p, z;
};

struct fphsp // phase space (x,y,z,vparallel)
{
    fvec X;
    float vp;
};
 
struct fpfvec
{
    fvec E;
    fvec B;
    fvec gB;
    fvec cb;
};

struct fpcrd // particle cord in (r, phi, z, vpara, mu)
{
    fcylv crd;
    float vb;
    float mu;
    float deltaw;
};

struct feqdst
{
    float F0;
    float F0r;
    float F0z;
};

#endif